import Layout from '@/layout/index.vue'

const Routers = [
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login/index.vue'),
    meta: { hidden: true }
  },
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    redirect: '/home',
    meta: { title: '首页', hidden: false },
    children: [
      {
        path: '/changerPwd',
        name: 'ChangerPwd',
        component: () => import('@/views/login/changePwd.vue'),
        meta: { hidden: true, title: '修改密码'}
      },
      {
        path: '/home',
        name: 'Home',
        component: () => import('@/views/home/index.vue'),
        meta: { title: '仪表盘', hidden: false },
      }, {
        path: '/list',
        name: 'List',
        component: () => import('@/views/book/list/index.vue'),
        meta: { title: '记录管理', hidden: false },
      }, {
        path: '/SelfStatement',
        name: 'SelfStatement',
        component: () => import('@/views/book/list/SelfStatement.vue'),
        meta: { title: '自我陈述', hidden: false },
      }, {
        path: '/RecordSelection',
        name: 'RecordSelection',
        component: () => import('@/views/book/list/RecordSelection.vue'),
        meta: { title: '记录遴选', hidden: false },
      }, {
        path: '/TermPaper',
        name: 'TermPaper',
        component: () => import('@/views/book/list/TermPaper.vue'),
        meta: { title: '学期报告', hidden: false },
      }, {
        path: '/ComprehensiveEvaluation',
        name: 'ComprehensiveEvaluation',
        component: () => import('@/views/book/list/ComprehensiveEvaluation.vue'),
        meta: { title: '毕业综评', hidden: false },
      }, {
        path: '/User',
        name: 'User',
        component: () => import('@/views/book/list/user.vue'),
        meta: { title: '个人资料', hidden: true },
      }
    ]
  }
]

export default Routers

// 动态路由处理
export const generatorRouters = [
  {
    path: '/home',
    name: 'Home',
    component: () => import('@/views/home/index.vue'),
  }
]
